package cn.his.medical.phismange

import android.os.Bundle
import cn.his.medical.phismange.app.base.BaseActivity
import cn.his.medical.phismange.app.base.BaseActivityKt
import cn.his.medical.phismange.bean.Demo
import cn.his.medical.phismange.view.IndicatorView

/**
 * 作者：xiewei on 2018/4/24 13:30
 * 邮箱：xiewei19910115@163.com
 */
class DemoIndicorActivity : BaseActivityKt(){
    private val list = ArrayList<Demo>()
    override fun initEventAndData() {
        val indicor = findViewById<IndicatorView>(R.id.demo)
        indicor.setMornal(getList());
    }

    override fun initEventAndData(savedInstanceState: Bundle) {

    }

    override fun getLayoutId(): Int {
        return R.layout.demo_activity;
    }

    fun getList():ArrayList<Demo>?{
        list.clear()
        for (i in 0..4){
            val demo = Demo()
            if (i%2 != 0) {
                demo.Status = "0";
            }else{
                demo.Status = "1";
            }
            demo.text = "hah "+i
            demo.time = "2108" + i
            list.add(demo)
        }
        return list
    }

}